package com.vrs.controller;

import com.vrs.common.context.UserContext;
import com.vrs.convention.page.PageResponse;
import com.vrs.convention.result.Result;
import com.vrs.convention.result.Results;
import com.vrs.domain.dto.req.*;
import com.vrs.domain.dto.resp.OrderRespDTO;
import com.vrs.domain.dto.resp.UserLoginRespDTO;
import com.vrs.domain.dto.resp.UserRespDTO;
import com.vrs.domain.entity.SysDictData;
import com.vrs.domain.entity.SysDictType;
import com.vrs.service.ISysDictDataService;
import com.vrs.service.ISysDictTypeService;
import com.vrs.service.UserService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletRequest;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * 用户管理控制层
 */
@RestController
@RequestMapping("/admin/SysDict/")
@RequiredArgsConstructor
@Tag(name = "数据字典管理")
public class SysDictController {

    private final ISysDictDataService dictDataService;
    private final ISysDictTypeService dictTypeService;

    @PostMapping("/listMyOrder")
    @Operation(summary = "查询数据字典列表")
    public Result<PageResponse<List<SysDictData>>> listMyOrder(@RequestBody SysDictDataReq request) {
        String dictType = request.getDictType();
        String dictValue = request.getDictValue();
        PageResponse<List<SysDictData>> list = dictDataService. selectDictDataList(request);
        return Results.success(list);
    }

//    @PostMapping("/listSysDictType")
//    @Operation(summary = "查询数据字典列表")
//    public Result<List<SysDictType>> listSysDictTypeResult(@RequestBody SysDictTypeReq sysDictTypeReq) {
//
//        List<SysDictData> list = dictDataService.selectDictLabel(dictType,dictValue);
//        return Results.success(list);
//    }
}
